home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 June / PersonalComputerWorld-June2009-CoverdiscCD.iso / Software / Shareware / Mockups for Desktop 1.5.27 / MockupsForDesktop.air / MockupsAir.swf / scripts / _PopUpButtonStyle.as < prev    next >
Encoding:
Text File  |  2009-03-03  |  1.1 KB  |  41 lines

  1. package
  2. {
  3.    import mx.core.IFlexModuleFactory;
  4.    import mx.skins.halo.PopUpButtonSkin;
  5.    import mx.skins.halo.PopUpIcon;
  6.    import mx.styles.CSSStyleDeclaration;
  7.    import mx.styles.StyleManager;
  8.    
  9.    public class _PopUpButtonStyle
  10.    {
  11.       public function _PopUpButtonStyle()
  12.       {
  13.          super();
  14.       }
  15.       
  16.       public static function init(param1:IFlexModuleFactory) : void
  17.       {
  18.          var fbs:IFlexModuleFactory = param1;
  19.          var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("PopUpButton");
  20.          if(!style)
  21.          {
  22.             style = new CSSStyleDeclaration();
  23.             StyleManager.setStyleDeclaration("PopUpButton",style,false);
  24.          }
  25.          if(style.defaultFactory == null)
  26.          {
  27.             style.defaultFactory = function():void
  28.             {
  29.                this.popUpIcon = PopUpIcon;
  30.                this.skin = PopUpButtonSkin;
  31.                this.paddingLeft = 3;
  32.                this.arrowButtonWidth = 18;
  33.                this.paddingRight = 3;
  34.                this.popUpGap = 0;
  35.             };
  36.          }
  37.       }
  38.    }
  39. }
  40.  
  41.